(1) Huy sds trong Lua_State
Vi moi lan chinh sua phai thay doi sds* chu khong phai sds.
Neu thay doi sds dan toi Segmentfault khi realloc.

#define ADV_QUERY_PATH "/_adv.gif"
#define ADC_QUERY_PATH "/_adc.html"
#define F_QUERY_PATH "/_f.html"
#define TRACKING_QUERY_PATH "/_tracking.gif"
#define ZC1_QUERY_PATH "/_zc.1.gif"
#define ZC2_QUERY_PATH "/_zc.2.gif"

/*path handler for tvc_vast*/
#define TVC_VAST_QUERY_PATH "/proxy"
MAX_COLON = 7
/* 3 new path handler*/
#define ADVM_QUERY_PATH "/_advm.gif"
#define ADCM_QUERY_PATH "/_adcm.htm"
#define CPA_QUERY_PATH "/cpa.gif"

#define FR_QUERY_PATH "/_fr.js"
#define CPM4K_QUERY_PATH "/_cpm4k.js"

/*_zc1.php*/
#define ZC1_DOMAIN_PARAM "_domain"
#define ZC1_ZONEID_PARAM "_zid"
#define ZC1_CI_PARAM "_ci"
#define ZC1_ZONEID_STRING_DEFAULT "-1"

/*_zc2.php*/
#define ZC2_DOMAIN_PARAM "_domain"
#define ZC2_ZONEID_PARAM "_zid"
#define ZC2_CI_PARAM "_ci"
#define ZC2_ZONEID_STRING_DEFAULT "-1"
/*path handler for clickmobile*/
#define CLICKMOBILE_QUERY_PATH "/cb"
/*path handler for viewmobile*/
#define VIEWMOBILE_QUERY_PATH "/vb"


#define TK_QUERY_PATH "/tk"
#define NUM_SEMICOLON 11
#define NUM_SEMICOLON_APP_MOBILE 5

/*path handler for tracking mobile*/
#define TRACKING_MOBILE_QUERY_PATH "/tkm"

/*path handler for tracking mobile guid and location*/
#define TRACKING_MOBILE_APP_QUERY_PATH "/tka"

/*path handler for check-xml*/
#define CHECK_XML_QUERY_PATH "/crossdomain.xml"

/*path handler for view_app_mobile*/
#define VIEW_APP_MOBILE_QUERY_PATH "/ambv"
#define CLICK_APP_MOBILE_QUERY_PATH "/ambc"

#ifdef HAVE_SERVER_STATUS
#define STATUS_URI "/status"
#define INTERVAL_PARAM "interval"
#endif



---------------
#define SEPARATE_SYN '|'
#define USER_AGENT_HEADER "user-agent"
#define COOKIE_HEADER "Cookie"
#define SET_COOKIE_HEADER "Set-Cookie"
#define REFERER_HEADER "Referer"
#define PRAGMA_HEADER "Pragma"
#define CACHE_CONTROL_HEADER "Cache-Control"
#define EXPIRES_HEADER "Expires"
#define LAST_MODIFIED_HEADER "Last-Modified"
#define CONTENT_TYPE_HEADER "Content-Type"
#define LOCATION_HEADER "Location"
#define SERVER_HEADER "Server"
#define CHARSET_HEADER "Charset"

/*_adv.php */
#define ADM_DOMAIN_PARAM "adm_domain"
#define ADM_ADITEM_PARAM "adm_aditem"
#define ADM_ADITEM_STRING_DEFAULT "12345678"
#define	ADM_ZONEID_PARAM "adm_zoneid"
#define ADM_ZONEID_STRING_DEFAULT "-1"
#define ADM_CHANNELID_PARAM "adm_channelid"
#define ADM_CHANNELID_STRING_DEFAULT "-1"Lua Programming Gems
#define ADM_CAMPAIGN_PARAM "adm_campaign"
#define ADM_CAMPAIGN_STRING_DEFAULT "-1"
#define ADM_REHTTP "adm_rehttp"

/*_zc1.php*/
#define ZC1_DOMAIN_PARAM "_domain"
#define ZC1_ZONEID_PARAM "_zid"
#define ZC1_CI_PARAM "_ci"
#define ZC1_ZONEID_STRING_DEFAULT "-1"
/*_zc2.php*/
#define ZC2_DOMAIN_PARAM "_domain"
#define ZC2_ZONEID_PARAM "_zid"
#define ZC2_CI_PARAM "_ci"
#define ZC2_ZONEID_STRING_DEFAULT "-1"

/* _tracking.php*/
#define TRACKING_FL_PARAM "fl"
#define TRACKING_JE_PARAM "je"
#define TRACKING_SR_PARM "sr"
#define TRACKING_SC_PARAM "sc"
#define TRACKING_HN_PARAM "hn"
#define TRACKING_P_PARAM "p"
#define TRACKING_R_PARAM "r"
#define TRACKING_G_PARAM "g"

/* _advm.php */
#define ADVM_ITEM_ID_PARAM "i"
#define ADVM_ZONE_ID_PARAM "zi"
#define ADVM_FLASH_PARAM "fl"
#define ADVM_JAVA_ENABLE_PARAM "je"
#define ADVM_SCREEN_RESOLUTION_PARAM "sr"
#define ADVM_SCREEN_DEP_PARAM "sc"
#define ADVM_HOSTNAME_PARAM "hn"
#define ADVM_URL_PARAM "p"

/* _adcm.php */
#define ADCM_ITEM_ID_PARAM "i"
#define ADCM_ZONE_ID_PARAM "zi"
#define ADCM_FLASH_PARAM "fl"
#define ADCM_JAVA_ENABLE_PARAM "je"
#define ADCM_SCREEN_RESOLUTION_PARAM "sr"
#define ADCM_SCREEN_DEP_PARAM "sc"
#define ADCM_HOSTNAME_PARAM "hn"
#define ADCM_URL_PARAM "p"
#define ADCM_REFERENCE_PARAM "re"

/*click.php*/
#define CLICK_REFERENCE_PARAM "re"
#define REGION_DEFAULT "0"
#define SEPARATE_CHAR '\t'
#define SEMICOLON_CHAR ';'

/*clickmobile & viewmobile*/
#define OS_MOBILE_COOKIE "__OS"

/* _tracking_mobile.php*/
#define TRACKING_MOBILE_FE_PARAM "fe"
#define TRACKING_MOBILE_JE_PARAM "je"
#define TRACKING_MOBILE_SR_PARM "sr"
#define TRACKING_MOBILE_SC_PARAM "sc"

/* cpa.php*/
#define CPA_T_PARAM "t"
#define CPA_P_PARAM "p"
#define CPA_R_PARAM "r"
#define CPA_BI_PARAM "bi"
#define CPA_CI_PARAM "ci"
#define CPA_REF_PARAM "ref"
#define CPA_RAN_PARAM "ran"
#define CPA_LURL_PARAM "lurl"


#define REGION_COOKIE "__C"
#define GUID_COOKIE "__uid"
#define CREATE_COOKIE "__create"
#define RC_COOKIE "__RC"
#define EXPIRE_TIME 31536000 /* 1 year*/
